<template>
  <el-dialog
      title="导入员工"
      :visible.sync="visible"
      width="500px"
      :close-on-click-modal="false"
      @closed="handleClose"
  >
    <el-upload
        class="upload-demo"
        ref="upload"
        :auto-upload="false"
        :show-file-list="true"
        :on-change="handleFileChange"
        accept=".xlsx"
    >
      <el-button slot="trigger" size="small" type="primary">选择文件</el-button>
      <div slot="tip" class="el-upload__tip">只能上传.xlsx文件</div>
    </el-upload>


    <span slot="footer" class="dialog-footer">
      <el-button @click="visible = false">取 消</el-button>
      <el-button
          type="primary"
          @click="submitUpload"
          :loading="uploading"
          :disabled="!selectedFile"
      >
        开始导入
      </el-button>
    </span>
  </el-dialog>
</template>

<script>
import Handler from './EmployeeImport.js'

export default Handler
</script>

<style scoped lang="scss">
@import './EmployeeImport.scss';
</style>
